package com.qdlc.p2p.manage.action;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Action;

import com.opensymphony.xwork2.ModelDriven;
import com.qdlc.p2p.biz.service.GoodsPicService;
import com.qdlc.p2p.biz.web.action.BaseAction;
import com.qdlc.p2p.dal.dto.GoodsPic;

public class ManageGoodsPicAction extends BaseAction<GoodsPic> implements ModelDriven<GoodsPic> {

	private GoodsPic model = new GoodsPic();
	
	@Override
	public GoodsPic getModel() {
		return model;
	}
	
	@Resource
	private GoodsPicService goodsPicService;
	
	@Action("/modules/user/score/deleteGoodsPic")
	public void deletePic() throws Exception{
		goodsPicService.deleteGoodsPic(model.getId());
		printJson("SUCCESS");
	}
}
